package logic

import (
	"context"
	"order/conmon/proto/user"
	"order/service/server"
)

type ServerUser struct {
	user.UnimplementedUserServer
}

func (s ServerUser) UserLogin(ctx context.Context, in *user.UserLoginReq) (*user.UserLoginResp, error) {
	login, err := server.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) GoodsList(ctx context.Context, in *user.GoodsListReq) (*user.GoodsListResp, error) {
	list, err := server.GoodsList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) OrderGoods(ctx context.Context, in *user.OrderGoodsReq) (*user.OrderGoodsResp, error) {
	goods, err := server.OrderGoods(in)
	if err != nil {
		return nil, err
	}
	return goods, nil
}
func (s ServerUser) OrderList(ctx context.Context, in *user.OrderListReq) (*user.OrderListResp, error) {
	list, err := server.OrderList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
